# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-editdistance
pkgver=0.5.3
pkgrel=1
pkgdesc='Fast implementation of the edit distance (Levenshtein distance).'
arch=('x86_64' 'aarch64')
license=('MIT')
url='https://github.com/aflc/editdistance'
depends=('python2')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/editdistance-0.5.3.tar.gz"
        'LICENSE')
sha512sums=('00a0d2607e90bb3ae10093c8300a3218409dec528772b6c0991f14236596ade9b912bcfddae26d6667bc17b2a09d72e6e04c696cf78b92f29c95cd304e7081a8'
            '590232c1e7fa5aaaaa77573c4ea23533522177ca0ac07a0ce7f00e446d47467df2e19936ecb5e057fddc664d1daca39e2217cb5f6e3192ef5edf49b1f73e0f10')

build() {
  cd "editdistance-$pkgver"

  python2 setup.py build
}

package() {
  cd "editdistance-$pkgver"

  python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build

  install -Dm 644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

